﻿function $(tagid)
{
	return document.getElementById(tagid);
}
function getSeachUrl(obj)
{
	if($("txtkey").value=="" || $("txtkey").value=="只需几个关键字,轻松锁定目标题")
	{
		obj.target = "_self";	
		obj.href="javascript:void(null);";
		$("txtkey").value="";
		$("txtkey").focus();
	}else
	{
		var type = $("ddlsofttype").value;
		var url  = "http://soso.diyidayi.com/"+ type +".aspx?key="+escape($("txtkey").value);
		obj.target = "_blank";
		obj.href = url;
	}
}
//显示老师
function showT(zhi)
{
	for(i=0;i<12;i++)
	{
		$("tea"+i).className = "off";
	}
	$("tea"+zhi).className = "on";
}
//标签切换
function itemchang(lm,count,zhi)
{
	for(i=0;i<count;i++)
	{
		$(lm+i).style.display = "none";
		$(lm+"li"+i).className = "off";
	}
	$(lm+zhi).style.display = "block";
	$(lm+"li"+zhi).className = "on";
}
var curr = 0;
function zdshowT()
{
	showT(curr);
	if(curr==11)
	{
		curr = 0;
	}else
	{
		curr++;
	}
}
function tj()
{
	var cg = true;
	try
	{
		if($("txtusername").value=="")
		{
			$("txtusername").focus();
			throw("用户名不能为空");
		}
		if($("txtuserpass").value=="")
		{
			$("txtuserpass").focus();
			throw("密码不能为空");
		}
	}catch(e)
	{
		cg = false;
		alert(e);
	}
	return cg;
}
setInterval(zdshowT,8000);